<template>
  <span @click="paste(text ?? '')">
    <slot></slot>
  </span>
</template>

<script setup lang="ts">
defineProps({
  text: {
    type: Object as () => string | number,
    require: true
  }
})
function paste(value: string | number) {
  uni.setClipboardData({
    data: value + ''
  })
}
</script>

<style scoped></style>
